﻿using Esosi.Repository.Models;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Esosi.Entity;

namespace Esosi.Register.Hospital.Models
{
    public class RegisterHospitalTpo
    {
        public decimal TotalFee
        {
            get
            {
                return PaySums.Sum(p => p.FeeSum);
            }
        }

        public decimal YingShou
        {
            get
            {
                return PaySums.Where(p => p.InvoicePayMode == Entity.InvoicePayMode.PersonPayCode).Sum(p => p.FeeSum);
            }
        }

        public IEnumerable<PaySum> PaySums { get; set; }

        /// <summary>
        /// 唯一号
        /// </summary>
        public Guid JsonGuid { get; set; }
    }
}